<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Feedback_mgr extends CI_Controller {
	public function ajax_submit() {
		$content = $this->input->post('content');
		$content = trim($content);
		
		$this->load->model('feedback_model');
		$ret = array('status' => STATUS_SUCCESS, 'msg' => '感谢您的反馈！');
		$this->feedback_model->add(array(
			'content' => $content,
			'ip' => $this->input->ip_address(),
			'status' => DB_STATUS_NORMAL,
			'create_time' => date('Y-m-d H:i:s')
		));
		
		echo json_encode($ret);
	}
}